﻿
@{
    ViewBag.Title = "服务器编辑";
}
@section Css {
<link href="~/Content/app.css" rel="stylesheet" />
<link href="~/Content/angular-ui-tree.min.css" rel="stylesheet" />
}
<div class="col-md-12">
    <div ng-controller="ServerController">
        <!-- BEGIN  HEADER-->
        <div class="page-bar">
            <ul class="page-breadcrumb">
                <li>
                    <i class="fa fa-home"></i>
                    <a href="/">主页</a>
                    <i class="fa fa-angle-right"></i>
                </li>
                <li>
                    <a href="@Url.Action("Index","Project")">服务器管理</a>
                    <i class="fa fa-angle-right"></i>
                </li>
                <li>
                    <a href="#">服务器编辑</a>

                </li>
            </ul>

        </div>
        <!-- END  HEADER-->
        <!--BEGIN Form -->
        <div>
            <div class="portlet  box blue">
                <div class="portlet-title">
                    <div class="caption">
                        <i class="fa fa-plus"></i>服务器编辑
                    </div>
                    <div class="actions">
                        <a class="btn btn-circle btn-icon-only btn-default fullscreen" href="javascript:;" data-original-title="" title="全屏"></a>
                    </div>
                </div>
                    <div class="portlet-body form">
                        <div id="bootstrap_alerts_demo"></div>
                        <form role="form" class="form-horizontal" name="serverForm" novalidate>
                            <div class="form-body">
                                <div class="form-group form-md-line-input">
                                    <label class="col-md-2 control-label" for="form_control_1">服务器名称</label>
                                    <div class="col-md-10">
                                        <input type="text" class="form-control" id="form_control_1" ng-model="model.Name" placeholder="请输入服务器名称" required>
                                        <div class="form-control-focus">
                                        </div>
                                        <span class="help-block">服务器名称是必填</span>
                                    </div>
                                </div>
                                <div class="form-group form-md-line-input">
                                    <label class="col-md-2 control-label" for="form_control_1">服务器IP</label>
                                    <div class="col-md-10">
                                        <input type="text" class="form-control" id="form_control_1" ng-model="model.IP" placeholder="请输入服务器IP" required>
                                        <div class="form-control-focus">
                                        </div>
                                        <span class="help-block">服务器IP是必填</span>
                                    </div>
                                </div>
                                <div class="form-group form-md-line-input">
                                    <label class="col-md-2 control-label" for="form_control_1">环境</label>
                                    <div class="col-md-10">
                                        <select name="deployenvironment" class="form-control" ng-model="model.EnvironmentType" required>
                                            <option ng-repeat="environment in environmentList" value="{{environment.Id}}" ng-selected="environment.Id==model.EnvironmentType">{{environment.Name}}</option>
                                        </select>
                                        <div class="form-control-focus">
                                        </div>
                                        <span class="help-block">环境必选</span>
                                    </div>

                                </div>
                                <div class="form-group form-md-line-input">
                                    <label class="col-md-2 control-label" for="form_control_1">描述</label>
                                    <div class="col-md-10">
                                        <textarea class="form-control" rows="3" ng-model="model.ServerDesc"></textarea>
                                        <div class="form-control-focus">
                                        </div>
                                    </div>

                                </div>
                            </div>
                            <div class="form-actions">
                                <div class="row">
                                    <div class="col-md-offset-2 col-md-10">
                                        <button type="button" class="btn blue btn-lg" ng-disabled="serverForm.$invalid" ng-click="SubmitFrom(model)">提交</button>
                                        <a type="button" class="btn default btn-lg" href="@Url.Action("ServerMgmt","SystemSet")">取消</a>
                                    </div>
                                </div>
                            </div>

                        </form>
                       
			        </div>
                </div>
            </div>
        </div>
        <!--END Form -->
    <input type="hidden" id="id" value="@Html.ViewContext.RouteData.Values["id"]" />
    </div>
</div>
@section Scripts {
<script src="~/app/controllers/ServerEdit.js"></script>
<script src="~/app/services/ServerServer.js"></script>
<script src="~/app/services/TaskService.js"></script>
}


